package com.demo.finkjava.controller;

import com.demo.finkjava.job.FlinkJobExample;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/test")
public class TestController {

    private final FlinkJobExample flinkJob;

    // 测试触发任务接口
    @GetMapping("/fink/job/trigger")
    public void flinkJobTrigger() throws Exception {

        flinkJob.execute();
    }
}
